.class public Lcom/glympse/platform/common/User$UserComparator;
.super Lcom/glympse/platform/GComparator$Users;
.source "User.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/platform/common/User;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "UserComparator"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/glympse/platform/GComparator$Users;"
    }
.end annotation


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 191
    invoke-direct {p0}, Lcom/glympse/platform/GComparator$Users;-><init>()V

    return-void
.end method


# virtual methods
.method public compare(Lcom/glympse/platform/common/User;Lcom/glympse/platform/common/User;)I
    .locals 9
    .parameter "oUser1"
    .parameter "oUser2"

    .prologue
    const v4, 0x7f7fffff

    const/4 v8, 0x1

    const/4 v7, -0x1

    .line 205
    invoke-virtual {p1}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-virtual {p2}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v3

    if-nez v3, :cond_0

    move v3, v7

    .line 271
    :goto_0
    return v3

    .line 211
    :cond_0
    invoke-virtual {p2}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-virtual {p1}, Lcom/glympse/platform/common/User;->IsSelf()Z

    move-result v3

    if-nez v3, :cond_1

    move v3, v8

    .line 213
    goto :goto_0

    .line 220
    :cond_1
    iget v3, p1, Lcom/glympse/platform/common/User;->m_fltDistanceToMeters:F

    invoke-static {v3}, Ljava/lang/Float;->isNaN(F)Z

    move-result v3

    if-eqz v3, :cond_2

    move v1, v4

    .line 221
    .local v1, fUs:F
    :goto_1
    iget v3, p2, Lcom/glympse/platform/common/User;->m_fltDistanceToMeters:F

    invoke-static {v3}, Ljava/lang/Float;->isNaN(F)Z

    move-result v3

    if-eqz v3, :cond_3

    move v0, v4

    .line 224
    .local v0, fOther:F
    :goto_2
    cmpg-float v3, v1, v0

    if-gez v3, :cond_4

    move v3, v7

    .line 226
    goto :goto_0

    .line 220
    .end local v0           #fOther:F
    .end local v1           #fUs:F
    :cond_2
    iget v3, p1, Lcom/glympse/platform/common/User;->m_fltDistanceToMeters:F

    move v1, v3

    goto :goto_1

    .line 221
    .restart local v1       #fUs:F
    :cond_3
    iget v3, p2, Lcom/glympse/platform/common/User;->m_fltDistanceToMeters:F

    move v0, v3

    goto :goto_2

    .line 230
    .restart local v0       #fOther:F
    :cond_4
    cmpl-float v3, v1, v0

    if-lez v3, :cond_5

    move v3, v8

    .line 232
    goto :goto_0

    .line 240
    :cond_5
    invoke-virtual {p1}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v3

    if-eqz v3, :cond_6

    invoke-virtual {p2}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v3

    if-nez v3, :cond_6

    move v3, v7

    .line 242
    goto :goto_0

    .line 246
    :cond_6
    invoke-virtual {p2}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v3

    if-eqz v3, :cond_7

    invoke-virtual {p1}, Lcom/glympse/platform/common/User;->IsOnline()Z

    move-result v3

    if-nez v3, :cond_7

    move v3, v8

    .line 248
    goto :goto_0

    .line 260
    :cond_7
    iget-object v3, p1, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    iget-object v4, p2, Lcom/glympse/platform/common/User;->m_strDisplayName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v2

    .line 261
    .local v2, nCompare:I
    if-eqz v2, :cond_8

    move v3, v2

    .line 263
    goto :goto_0

    .line 271
    :cond_8
    iget-wide v3, p1, Lcom/glympse/platform/common/User;->m_lUserId:J

    iget-wide v5, p2, Lcom/glympse/platform/common/User;->m_lUserId:J

    cmp-long v3, v3, v5

    if-gez v3, :cond_9

    move v3, v7

    goto :goto_0

    .line 272
    :cond_9
    iget-wide v3, p1, Lcom/glympse/platform/common/User;->m_lUserId:J

    iget-wide v5, p2, Lcom/glympse/platform/common/User;->m_lUserId:J

    cmp-long v3, v3, v5

    if-lez v3, :cond_a

    move v3, v8

    goto :goto_0

    :cond_a
    const/4 v3, 0x0

    goto :goto_0
.end method

.method public bridge synthetic compare(Ljava/lang/Object;Ljava/lang/Object;)I
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 1
    check-cast p1, Lcom/glympse/platform/common/User;

    check-cast p2, Lcom/glympse/platform/common/User;

    invoke-virtual {p0, p1, p2}, Lcom/glympse/platform/common/User$UserComparator;->compare(Lcom/glympse/platform/common/User;Lcom/glympse/platform/common/User;)I

    move-result v0

    return v0
.end method
